//
//  TollStationHeaderView.m
//  Runone
//
//  Created by runone02 on 16/12/7.
//  Copyright © 2016年 runone. All rights reserved.
//

#import "TollStationHeaderView.h"
#import "OneConst.h"
#import "AppConstants.h"

@interface TollStationHeaderView ()
@property (weak, nonatomic) IBOutlet UIImageView *iconImageV;
@property (weak, nonatomic) IBOutlet UILabel *tollStation;
@property (weak, nonatomic) IBOutlet UILabel *eventType;
@property (weak, nonatomic) IBOutlet UILabel *headerLabel;
@property (weak, nonatomic) IBOutlet UILabel *updateTimeLabel;

@property (weak, nonatomic) IBOutlet UILabel *dealDescriptionLabel;

@end

@implementation TollStationHeaderView

#pragma  ------------- 收费事件详情界面


- (void)awakeFromNib {
    [super awakeFromNib];
//    _iconImageV.image = [UIImage imageNamed:@"收费"];
    
    _tollStation.textColor          = kTableViewCellTextColor;
    _eventType.textColor            = kTableViewCellTextColor;
    _headerLabel.textColor          = kTableViewCellTextColor;
    _updateTimeLabel.textColor      = kTableViewCellTextColor;
    _dealDescriptionLabel.textColor = kTableViewCellTextColor;
}

//设置模型数据
- (void)setModel:(TollEvent *)model {
    _model = model;
    _tollStation.text = [NSString stringWithFormat:@"%@",_model.TollStationName];
    _headerLabel.text = [NSString stringWithFormat:@"值班站长:%@",_model.DutyMonitor];
//    if (_model.EventType == 0) {
//        _eventType.text = [NSString stringWithFormat:@"收费事件"];
//    }else if (_model.EventType == 1) {
//        _eventType.text = [NSString stringWithFormat:@"逃费事件"];
//    }else if (_model.EventType == 2){
//        _eventType.text = [NSString stringWithFormat:@"冲卡事件"];
//    } else {
//        _eventType.text = [NSString stringWithFormat:@"现场纠纷"];
//    }
    _eventType.text = _model.EventTypeName;
    _updateTimeLabel.text = [NSString stringWithFormat:@"发生时间:%@",_model.OccurTime];
}

- (void) setBackModel:(TollEvent *)backModel {
    
    _backModel = backModel;
    _dealDescriptionLabel.text = [NSString stringWithFormat:@"%@",_backModel.EventDescription];
}

@end
